package java2_unit5_1015;

public class Dog extends Pet {

	private int love;
	
	public int getLove() {
		return love;
	}

	public void setLove(int love) {
		if(love<1 || love>10) {
			love=5;
		}
		this.love = love;
	}

	
	public Dog() {

	}

	public Dog(String name, int health, String sex, int love) {
		super(name, health, sex);
		this.love = love;
	}

	@Override
	public void toHospital() {
		System.out.println("宠物狗去看病");
	}

	@Override
	public void toFeed() {
		System.out.println("宠物狗吃狗粮");
	}

}
